package com.ruoyi.system.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Zhangyuting
 * @Desctription: TODO
 * @Date: Created in 2025/6/2 16:03
 * @Version: 1.0
 */
@Data
public class TechNode {
    private String techLevel;
    private String techItid;
    private String techItname;
    private String techPtbody;
    private List<TechNode> children;

    public TechNode(String techLevel, String techItid, String techItname, String techPtbody) {
        this.techLevel = techLevel;
        this.techItid = techItid;
        this.techItname = techItname;
        this.techPtbody = techPtbody;
        this.children = new ArrayList<>();
    }

    // Getters and setters
    public String getTechLevel() { return techLevel; }
    public String getTechItid() { return techItid; }
    public String getTechItname() { return techItname; }
    public String getTechPtbody() { return techPtbody; }
    public List<TechNode> getChildren() { return children; }
    public void addChild(TechNode child) { this.children.add(child); }

    @Override
    public String toString() {
        return "TechNode{" +
                "techLevel='" + techLevel + '\'' +
                ", techItid='" + techItid + '\'' +
                ", techItname='" + techItname + '\'' +
                ", techPtbody='" + techPtbody + '\'' +
                ", children=" + children.size() +
                '}';
    }
}
